#pragma once

#include "EntityController.h"
#include "IBehavior.h"

class SpawnPointBehavior : public IBehavior
{
public:
	static const HashedString type;

	const HashedString& Type() const;

	SpawnPointBehavior( EntityController* controller );

	bool AddDestination( IEvent& event );
	void Update();

	void GroupName( HashedString name );
	void EnemyGroupName( HashedString name );

	bool ToXML( tinyxml2::XMLPrinter& printer );
	bool FromXML( tinyxml2::XMLElement* element );
protected:
	HashedString m_enemyGroupName;
	HashedString m_groupName;

	Time m_time;
	bool m_spawning;
	unsigned int m_spawnCounter;
	unsigned int m_spawnCount;
	float m_secondsBetweenSpawns;
	float m_secondsBetweenEntity;
};